package com.zhuqieli.database_learn.utils;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author fwf
 * @description shiro封装用户名和密码为UsernamePasswordToken对象，
 * UsernamePasswordToken是AuthenticationToken的实现类，
 * 整合jwt，JwtFilter传递给Realm的token要符合是AuthenticationToken的实现类。
 * @date 2023/8/31 14:08
 */

public class JwtToken implements AuthenticationToken {
    private String token;

    public JwtToken(String token) {
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
